﻿using System.Collections;
using System.Collections.Generic;
using System.Text;
using FastDev;
using Newtonsoft.Json;
using UnityEngine;

public class Recv1 : MonoBehaviour
{
    // Start is called before the first frame update
    void OnEnable()
    {
        MsgManager.Instance.Register(111, Handler);
    }

    void Handler(object[] data)
    {
        Debug.Log(gameObject.name + " recv:" + JsonConvert.SerializeObject(data));
    }

    private void OnDestroy()
    {
        MsgManager.Instance.UnRegister(111, Handler);
    }
}
